inherited dm_indicacaouso: Tdm_indicacaouso
  OldCreateOrder = True
  Left = 475
  Top = 210
  inherited sqlConsulta: TSQLQuery
    SQL.Strings = (
      'select'
      '    i.cod_indicacao,'
      '    i.descricao,'
      '    i.data_cad,'
      '    i.data_alteracao,'
      '    i.situacao,'
      '    case'
      '      when i.situacao = '#39'True'#39' then '#39'ATIVO'#39' else '#39'INATIVO'#39
      '    end as situacao_desc,'
      '    count(a.lig_cod_forma) as forma'
      'from F_INDICACAO_USO i'
      
        'left join f_forma_indicacao_uso a on (a.lig_cod_indicacao = i.co' +
        'd_indicacao)')
  end
  inherited cdsConsulta: TClientDataSet
    object cdsConsultaCOD_INDICACAO: TIntegerField
      Alignment = taCenter
      FieldName = 'COD_INDICACAO'
      Required = True
    end
    object cdsConsultaDESCRICAO: TStringField
      FieldName = 'DESCRICAO'
      Required = True
      Size = 100
    end
    object cdsConsultaDATA_CAD: TDateField
      Alignment = taCenter
      FieldName = 'DATA_CAD'
    end
    object cdsConsultaDATA_ALTERACAO: TDateField
      Alignment = taCenter
      FieldName = 'DATA_ALTERACAO'
    end
    object cdsConsultaSITUACAO: TStringField
      Alignment = taCenter
      FieldName = 'SITUACAO'
      Size = 5
    end
    object cdsConsultaSITUACAO_DESC: TStringField
      Alignment = taCenter
      FieldName = 'SITUACAO_DESC'
      Required = True
      FixedChar = True
      Size = 7
    end
    object cdsConsultaFORMA: TIntegerField
      FieldName = 'FORMA'
      Required = True
    end
  end
  inherited qryPKChave: TSQLQuery
    SQL.Strings = (
      'SELECT GEN_ID(gen_f_indicacao_uso,1)'
      'FROM RDB$DATABASE')
  end
  inherited cdsRegistro: TClientDataSet
    OnReconcileError = cdsRegistroReconcileError
    object cdsRegistroCOD_INDICACAO: TIntegerField
      Alignment = taCenter
      FieldName = 'COD_INDICACAO'
      Required = True
    end
    object cdsRegistroDESCRICAO: TStringField
      FieldName = 'DESCRICAO'
      Required = True
      Size = 100
    end
    object cdsRegistroDATA_CAD: TDateField
      Alignment = taCenter
      FieldName = 'DATA_CAD'
    end
    object cdsRegistroDATA_ALTERACAO: TDateField
      Alignment = taCenter
      FieldName = 'DATA_ALTERACAO'
    end
    object cdsRegistroSITUACAO: TStringField
      FieldName = 'SITUACAO'
      Size = 5
    end
  end
  inherited sqlRegistro: TSQLQuery
    Params = <
      item
        DataType = ftInteger
        Name = 'codigo'
        ParamType = ptInput
      end>
    SQL.Strings = (
      'select'
      '    i.cod_indicacao,'
      '    i.descricao,'
      '    i.data_cad,'
      '    i.data_alteracao,'
      '    i.situacao'
      'from F_INDICACAO_USO i'
      'where i.cod_indicacao = :codigo')
  end
end
